package com.quartz.demo.task;

import com.quartz.demo.service.ActivityService;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

public class HelloJob implements Job {

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.err.println("hello moto执行了,时间是"+System.currentTimeMillis()+"   线程是>>>"+Thread.currentThread().getName()+"  线程ID是>>>"+Thread.currentThread().getId());
        JobDataMap jobDataMap = context.getMergedJobDataMap();
        System.out.println("map_id--------->"+context.getJobDetail().getJobDataMap().getString("id"));
        System.out.println("map_path--------->"+context.getJobDetail().getJobDataMap().getString("path"));
    }
}
